package com.his.his_system.controller.DataStatisticsController;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.his.his_system.domain.DzmHisCarePkg;
import com.his.his_system.domain.MonthlyStatistics;
import com.his.his_system.service.DzmHisCarePkgService;
import org.springframework.web.bind.annotation.GetMapping;    import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 年月报表统计
 */
@RestController
@RequestMapping("monthlyReport")
public class MonthlyReportController {
      @Resource
      private DzmHisCarePkgService dzmHisCarePkgService;



      //分页显示条数
      private static final int PAGE_SIZE=4;

      @GetMapping("getMonthlyReport")
      PageInfo<DzmHisCarePkg> getMonthlyReport(Integer num){


	  // 设置分页
	  PageHelper.startPage(num,PAGE_SIZE);

	  PageInfo<DzmHisCarePkg> page = new PageInfo<DzmHisCarePkg>(dzmHisCarePkgService.getMonthlyReport());


	  return page;
      }

      /**
       * 获取某年每月的支付信息
       * @param year
       */
      @GetMapping("/annualStatistics")
      List<MonthlyStatistics> annualStatistics(String year){

	  return dzmHisCarePkgService.annualStatistics(year);

      }


}